from rest_framework.serializers import ModelSerializer

from areas.models import Area

class AreaSerializers(ModelSerializer):
    class Meta:
        model = Area
        fields = ('id', 'name')


class SubAreaSerializers(ModelSerializer):
    subs = AreaSerializers(many=True, read_only=True)
    class Meta:
        model = Area
        fields = ('id', 'name', 'subs')
